<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <link rel="stylesheet" href="/layui/css/layui.css">
  <link rel="stylesheet" href="/css/index.css">
  <link rel="stylesheet" href="/css/nav.css">
</head>
<body>
	<div class="blog-header layui-bg-cyan">
		<div class="layui-container">
			<ul class="layui-nav layui-bg-cyan">
				<li class="layui-nav-item"><a href="/">
						<i class="layui-icon layui-icon-home">首页</i>
					</a></li>
				<li class="layui-nav-item"><a href="/">Web</a></li>
				<li class="layui-nav-item"><a href="/">大数据</a></li>
				<li class="layui-nav-item"><a href="/">Java</a></li>
				<li class="layui-nav-item"><a href="/">C++</a></li>
				<li class="layui-nav-item"><a href="/">Python</a></li>
				<li class="layui-nav-item"><a href="/">更多</a></li>
			</ul>
			<ul class="layui-nav blog-user layui-bg-cyan user-alylog">
					<li class="layui-nav-item">
						<a class="user/manager" href="user/manager">个人中心</a>
						<!-- <span class="layui-badge-dot"></span> -->
					</li>
					<li class="layui-nav-item">
						<a href="javascript:;">
							<img class="user-avatar layui-nav-img" src="" alt="">
							<span class="user-name"></span>
						</a>
						<dl class="layui-nav-child">
							<dd>
								<a class="user-logout" href="/user/logout">退出登录</a>
							</dd>
						</dl>
					</li>
			</ul>
			<ul class="layui-nav blog-user layui-bg-cyan user-notlog">
				<li class="layui-nav-item"><a href="/user/login">登录</a></li>
				<li class="layui-nav-item"><a href="/user/reg">注册</a></li>
			</ul>
		</div>
	</div>
	<div class="blog-panel">
		<div class="layui-container">
			<ul class="layui-clear">
				<li><a href="javascript:;">HTML</a></li>
				<li><a href="javascript:;">CSS</a></li>
				<li><a href="javascript:;">JavaScript</a></li>
				<li><a href="javascript:;">node.js</a></li>
				<li><a href="javascript:;">vue.js</a></li>
			</ul>
			<div class="blog-column-right">
				<a href="/article" class="layui-btn layui-bg-blue">添加文章</a>
			</div>
		</div>
	</div>
	<div class="layui-container main">
		<div class="layui-row layui-col-space15">
			<div class="layui-col-md8">
					<ul class="article-list">
						<li>
							加载中...
						</li>
					</ul>
					<div id="laypage" data-maxNum=maxNum></div>
			</div>
			<div class="layui-col-md4">
				<div class="layui-card">
					<div class="layui-card-header"><strong>最新公告</strong></div>
					<div class="layui-card-body announce">
						<p><a href="">刚刚发表了一篇关于js的博客</a></p>
						<p><a href="">今天天气真好，出来钓鱼</a></p>
						<p><a href="">当今IT发展趋势</a></p>
						<p><a href="">关于node的坑</a></p>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div id="blog-footer">
		<p>2018 ©
			<a href="javascript:;">&nbsp;版权&nbsp;</a>
			<a href="javascript:;">联系方式:17806096870</a>
		</p>
	</div>
	<script src="/jquery/jquery.min.js"></script>
	<script src="/layui/layui.js"></script>
	<script src="/js/index.js"></script>
	<script>
		layui.use('element', function(){
		});
	</script>
	</script>
</body>
</html>

<!-- block css
  link(rel="stylesheet", href="/css/index.css")
//- 
  artList
    头像
    tips
    文章url
    作者
    时间
    评论数 -->

<!-- block contents -->
  <!-- include ./layout/tag -->
  
  <!-- .layui-container.main
    .layui-row.layui-col-space15
      //- 文章列表
      .layui-col-md8
        ul.article-list
          //- li index.html
          //- li 这是 pug 渲染出来的首页

          each info in artList
            li
              a.list-face
                img(src=info.author.avatar, alt=info.author)
              h2
                a.layui-badge= info.tips
                a.articlt-title.ellipsis(href=`/article/${info._id}`)= info.title
              .list-info
                a= info.author.username
                span= info.createTime.toLocaleString()
                span.list-reply
                  i(title="评论").layui-icon.layui-icon-dialogue
                  = info.commentNum
        include ./layout/laypage.pug
        
      //- 右侧公告
      include ./layout/right_tag


block scripts
  script(src="/js/index.js")
  //- 登录成功，返回根路由
  //- script.
  //-   //- let val = !{JSON.stringify(logJus)};
    
  //-   if(val){
  //-     layui.use('form', function(){
  //-       layer.alert('请先登录', (res) => {
  //-         location.href = "/user/login"
  //-       })
  //-     })
  //-   }
  //- 弹框组件
  //- script(src="/js/dialog.js") -->
  
    
    
    
    


